<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //find可以对数组的里面的对象
        let table=[{name:"javascript"},{name:"css"},{name:"java"}];
         let result=table.find(function(item){
           
             return item.name=="css";

         });
        //  console.log(Boolean(result));//treu
        //  console.log(result);//{name: 'css'}
         
        //  //用includes的话查询不到
        //  console.log(table.includes({name:"css"}));//false
        
        //  //findindex,也是里面写一个方法
        //  let index_result=table.findIndex(function(item){
        //      return item.name=="java";
        //  });
        //  console.log(index_result);//1
//   console.log(table.find("css"));

 
    </script>
</body>
</html>